import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/allfood',
            component: () => import(/* webpackChunkName: "donate" */ '../components/food/Allfood.vue'),
            meta: { title: '餐饮管理与数据分析系统' }
        },
        {
            path: '/clientSale',
            component: () => import(/* webpackChunkName: "donate" */ '../components/sale/clientSale.vue'),
            meta: { title: '餐饮管理与数据分析系统' }
        },
        {
            path: '/cookSale',
            component: () => import(/* webpackChunkName: "donate" */ '../components/sale/cookSale.vue'),
            meta: { title: '餐饮管理与数据分析系统' }
        },
        {
            path: '/404',
            component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
            meta: { title: '餐饮管理与数据分析系统' }
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '餐饮管理与数据分析系统' },
            children: [
                {
                    path: '/user',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/user/user.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    path: '/sevenSale',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/echarts/sevenSale.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    path: '/allSale',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/echarts/allSale.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                   
                },
                {
                    path: '/cookSale',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/sale/cookSale.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    path: '/manageFood',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/food/ManageFood.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    path: '/allfood',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/food/Allfood.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    //分类管理
                    path: '/cate',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/cate/CateGory.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    //轮播图管理管理
                    path: '/slideshow',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/slideshow/SlideShow.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    //Echart管理
                    path: '/echart',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/echart/echart.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    path: '/dashboard',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    path: '/icon',
                    component: () => import(/* webpackChunkName: "icon" */ '../components/page/Icon.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    path: '/table',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/BaseTable.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    path: '/tabs',
                    component: () => import(/* webpackChunkName: "tabs" */ '../components/page/Tabs.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    path: '/form',
                    component: () => import(/* webpackChunkName: "form" */ '../components/page/BaseForm.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    // 富文本编辑器组件
                    path: '/editor',
                    component: () => import(/* webpackChunkName: "editor" */ '../components/page/VueEditor.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    // markdown组件
                    path: '/markdown',
                    component: () => import(/* webpackChunkName: "markdown" */ '../components/page/Markdown.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    // 图片上传组件
                    path: '/upload',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/Upload.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    // vue-schart组件
                    path: '/charts',
                    component: () => import(/* webpackChunkName: "chart" */ '../components/page/BaseCharts.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    // 拖拽列表组件
                    path: '/drag',
                    component: () => import(/* webpackChunkName: "drag" */ '../components/page/DragList.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    // 拖拽Dialog组件
                    path: '/dialog',
                    component: () => import(/* webpackChunkName: "dragdialog" */ '../components/page/DragDialog.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    // 国际化组件
                    path: '/i18n',
                    component: () => import(/* webpackChunkName: "i18n" */ '../components/page/I18n.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    // 权限页面
                    path: '/permission',
                    component: () => import(/* webpackChunkName: "permission" */ '../components/page/Permission.vue'),
                    meta: { title: '权限测试', permission: true }
                },

                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                },
                {
                    path: '/class',
                    component: () => import(/* webpackChunkName: "403" */ '../components/fsh/Class.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    path: '/addClass',
                    component: () => import(/* webpackChunkName: "403" */ '../components/fsh/AddClass.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    path: '/deleteClass',
                    component: () => import(/* webpackChunkName: "403" */ '../components/fsh/DeleteClass.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    path: '/updateClass',
                    component: () => import(/* webpackChunkName: "403" */ '../components/fsh/UpdateClass.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                
                {
                    path: '/selectGoodsById',
                    component: () => import(/* webpackChunkName: "403" */ '../components/fsh/SelectGoodsByid.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                // selectKuang
                {
                    path: '/selectKuang',
                    component: () => import(/* webpackChunkName: "403" */ '../components/fsh/SelectKuang.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                },
                {
                    path: '/donate',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Donate.vue'),
                    meta: { title: '餐饮管理与数据分析系统' }
                }
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录之餐饮管理与数据分析系统' }
        },
        {
            path: '*',
            redirect: '/404'
        },
    ]
});
